package com.yykj.tencent.im.server.controller;

import com.yykj.tencent.im.server.bean.request.GetAppidGroupListRequest;
import com.yykj.tencent.im.server.bean.request.GetRecentContactListRequest;
import com.yykj.tencent.im.server.bean.response.GetAppidGroupListResult;
import com.yykj.tencent.im.server.bean.response.GetRecentContactListResult;
import com.yykj.tencent.im.server.service.RecentContactService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@Slf4j
@Api(tags = "腾讯云通信--最近联系人")
@RequestMapping("api/tencent/im/recent/contact")
public class RecentContactController {

    @Resource
    private RecentContactService recentContactService;

    /**
     * 拉取会话列表
     */
    @SneakyThrows
    @ApiOperation("拉取会话列表")
    @PostMapping("/list")
    public GetRecentContactListResult list(GetRecentContactListRequest body){
        return recentContactService.recentContactList(body);
    }


}
